<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <!-- 开发环境版本，包含了有帮助的命令行警告 -->
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <title>Title</title>
</head>
<body>
<div id="app">
    <form action="reserve">
        <table>
            <tr>
                <th>车型：</th>
                    <input type="radio" name="type" v-for="item in type" :value="item"
                           v-model="typeIndex"></input>
<!--                                    <input type="radio" name="type" value="0" >小型电车（双座）-->
<!--                                    <input type="radio" name="type" value="1" checked>轿车-->
<!--                                    <input type="radio" name="type" value="2">SUV-->
<!--                                    <input type="radio" name="type" value="3">其他-->

            </tr>
            <tr>
                <th id="we">清洗项目：{{typeIndex}}</th>
            <tr th:each="p : ${price}">
                <th th:text="${p.type}">
                <th th:text="${p.price}">
                </th>
            </tr>
            <tr>
                <th>地址：<input type="text"></th>
            </tr>
        </table>
    </form>
</div>
</body>
<script>
    var app = new Vue({
        el: '#app',
        data() {
            return {
                type: ["小型电车（双座）", "轿车", "SUV", "其他"],
                typeIndex: "轿车",
            }
        },
        methods: {
            dj(i) {
                var typeIndex = i;
            }
        }
    });
    function f(i) {
        app.dj(i);
    }
</script>
</html>